import { defineSuccessMock } from '../index'

export default defineSuccessMock([
  {
    //获取当前用户信息，需要登录
    url: '/login',
    method: 'POST',
    body: {
      token: new Date().getDate().toString()
    }
  },
  {
    url: '/currentMenus',
    method: 'GET',
    body: {
      menus: [
        {
          title: '首页',
          menuType: 'router',
          path: '/',
          component: '/system/Home.vue',
          keepAlive: true,
          componentName: 'Home',
          isAffix: true
        },
        {
          title: '编辑器',
          menuType: 'router',
          path: '/editor',
          component: '/system/Editor.vue',
          keepAlive: false,
          componentName: 'Editor',
          isAffix: true
        },
        {
          title: '菜单1',
          menuType: 'dir',
          icon: 'fold',
          children: [
            {
              title: '菜单1-1',
              menuType: 'router',
              path: '/path1-1',
              component: '/system/System.vue',
              keepAlive: true,
              componentName: 'System',
              icon: 'location'
            },
            {
              title: '菜单1-2',
              menuType: 'router',
              path: '/path1-2',
              component: '/system/About.vue',
              keepAlive: true,
              componentName: 'About',
              icon: 'location',
              isAffix: false,
              children: [
                {
                  title: '菜单1-2-1',
                  menuType: 'router',
                  path: '/path1-2-1',
                  component: '/system/System.vue',
                  keepAlive: true,
                  componentName: 'System',
                  icon: 'location'
                },
                {
                  title: '菜单1-2-2',
                  menuType: 'router',
                  path: '/path1-2-2',
                  component: '/system/About.vue',
                  keepAlive: true,
                  componentName: 'About',
                  icon: 'location'
                }
              ]
            },
            {
              title: '菜单1-3',
              menuType: 'router',
              path: '/path1-3',
              component: '/system/System.vue',
              keepAlive: true,
              componentName: 'System',
              icon: 'location'
            },
            {
              title: '菜单1-4',
              menuType: 'router',
              path: '/path1-4',
              component: '/system/System.vue',
              keepAlive: true,
              componentName: 'System',
              icon: 'location'
            },
            {
              title: '菜单1-5',
              menuType: 'router',
              path: '/path1-5',
              component: '/system/System.vue',
              keepAlive: true,
              componentName: 'System',
              icon: 'location'
            },
            {
              title: '菜单1-6',
              menuType: 'router',
              path: '/path1-6',
              component: '/system/System.vue',
              keepAlive: true,
              componentName: 'System',
              icon: 'location'
            },
            {
              title: '菜单1-7',
              menuType: 'router',
              path: '/path1-7',
              component: '/system/System.vue',
              keepAlive: true,
              componentName: 'System',
              icon: 'location'
            },
            {
              title: '菜单1-8',
              menuType: 'router',
              path: '/path1-8',
              component: '/system/System.vue',
              keepAlive: true,
              componentName: 'System',
              icon: 'location'
            },
            {
              title: '菜单1-9',
              menuType: 'router',
              path: '/path1-9',
              component: '/system/System.vue',
              keepAlive: true,
              componentName: 'System',
              icon: 'location'
            },
            {
              title: '菜单1-10',
              menuType: 'router',
              path: '/path1-10',
              component: '/system/System.vue',
              keepAlive: true,
              componentName: 'System',
              icon: 'location'
            },
            {
              title: '菜单1-11',
              menuType: 'router',
              path: '/path1-11',
              component: '/system/System.vue',
              keepAlive: true,
              componentName: 'System',
              icon: 'location'
            },
            {
              title: '菜单1-12',
              menuType: 'router',
              path: '/path1-12',
              component: '/system/System.vue',
              keepAlive: true,
              componentName: 'System',
              icon: 'location'
            },
            {
              title: '菜单1-13',
              menuType: 'router',
              path: '/path1-13',
              component: '/system/System.vue',
              keepAlive: true,
              componentName: 'System',
              icon: 'location'
            }
          ]
        },
        {
          title: '跳转外部链接',
          menuType: 'link',
          oriURL: 'https://www.baidu.com',
          icon: 'location'
        },
        {
          title: 'Iframe',
          menuType: 'iframe',
          oriURL: 'http://localhost:8080',
          icon: 'location'
        }
      ]
    }
  },
  {
    url: '/menu/list',
    method: 'GET',
    body: {}
  },
  {
    url: '/menu/:id',
    method: 'GET',
    body(request) {
      const id = request.params.id as string
      return {}
    }
  },
  {
    url: '/menu/:id',
    method: 'PUT',
    body(request) {
      const id = request.params.id as string
      return {}
    }
  },
  {
    url: '/menu/:id',
    method: 'DELETE',
    body(request) {
      const id = request.params.id as string
      return {}
    }
  }
])
